package cn.usian.client;


import cn.usian.common.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Locale;

@FeignClient(value = "categoryservice",fallbackFactory = CategoryClientFallbackFactory.class)
public interface CategoryClient {

    @GetMapping("/category/page")
    public R findPage(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int pageSize);
    @PostMapping("/category")
    public R save(@RequestBody Locale.Category category);
}
